#include <iostream>
#include <cstdio>
using namespace std;

class Base1 {
public:
  Base1() {puts("Base 1");}
  ~Base1() {puts("~Base 1");}
};

class Base2 {
public:
  Base2() {puts("Base 2");}
  ~Base2() {puts("~Base 2");}
};

class Level1 : virtual public Base2, virtual public Base1 {
public:
  Level1() {puts("Level 1");}
  ~Level1() {puts("~Level 1");}
};

class Level2 : virtual public Base1, virtual public Base2 {
public:
  Level2() {puts("Level 2");}
  ~Level2() {puts("~Level 2");}
};

class Leaf : public Level1, /*virtual*/ public Level2 {
public:
  Leaf() {puts("Leaf");}
  ~Leaf() {puts("~Leaf");}
};

int main() {
  Leaf obj;
}
